function gets(pageNum) {
    var m=$("#dinumber").val();
    var l=$("#cname").val();
    var k=$("#jixing").val();
    var j=$("#guige").val();
    var i=$("#danwei").val();
    var h=$("#cc").val();
    var g=$("#qiye").val();
    var f=$("#shangpin").val();
    var e=$("#lefPprice").val();
    var d=$("#rightPrice").val();
    var c=$("#cengci").val();
    var b=$("#dcid").val();
    var a=$("#state").val();
    var pageN = pageNum;
    var v = window.location.href;
    var v1 = v.substring(v.lastIndexOf("?") + 1, v.length);

    $.ajax({
            url: '/myspringboot/purchasement/findallcgd',
            type: 'post',
            dataType: "json",
            data:{
                dinumber:m,
                cname:l,
                jixing:k,
                guige:j,
                danwei:i,
                cc:h,
                qiye:g,
                shangpin:f,
                lefPprice:e,
                rightPrice:d,
                cengci:c,
                leibie:b,
                state:a,
                pageNum:pageN,
                id:v1,
            },

            success:function(result){
                    var result = result.data;
                    yibu(result.pages,result.pageNum);
                    var list = result.list;
                    $(".a").empty();
                    for (var i = 0; i < list.length; i++){
                        //序号
                        var diId = list[i].diId;
                        var bb="-"
                        //药品流水号
                        var daNumber = list[i].diNumer;
                        //通用名
                        var diName = list[i].diName;
                        //商品名称
                        var drugAtegory = list[i].drugAtegory
                        if (drugAtegory!=null) {
                            var daName = drugAtegory.daName;
                        }else {
                             daName = "null";
                        }
                        //剂型
                        var diForm = list[i].diForm;
                        //规格
                        var diSpecifications = list[i].diSpecifications;
                        //单位
                        var diUnit = list[i].diUnit;
                        //装换系数
                        var diCc = list[i].diCc;
                        //生产企业
                        var supplier = list[i].supplier;
                        if (supplier!=null) {
                            var daSupplier = supplier.surName;
                        }else {
                             daSupplier = "null";
                        }
                        //中间jia
                        var diNewPrice = list[i].diNewPrice;
                        //交易价
                        var jiaoyijia = list[i].diNewPrice;
                        //采购量
                        var podiPd = list[i].podiPd;
                        if (podiPd!=null){
                            var caigouliang = podiPd.podiNumber;
                        }else {
                             caigouliang = "null";
                        }
                        //总金额
                        var podiPd =list[i].podiPd;
                        if (podiPd!=null){
                            var zongjine =podiPd.podiTotal;
                        } else {
                             zongjine ="null";
                        }
                        //供货商
                        var supplier = list[i].supplier;
                        if (supplier!=null){
                            var dqlName = supplier.surName;
                        } else {
                             dqlName = "null";
                        }
                        //交易状态
                        var diTradingStatus = list[i].diTradingStatus;
                        var dididi = "<input class='aaaaaaa' type='checkbox' name='chec' value='"+diId+"' class='itemSelect'>";
                        var a="";
                        if (diTradingStatus==0){
                            a = "未交易";
                        } else {
                            a= "交易完成"
                        }
                        var $tr = '<tr>'+
                            '<td>'+diId+'</td>'+
                            '<td>'+dididi+'</td>'+
                            '<td>'+daNumber+'</td>'+
                            '<td>'+diName+'</td>'+
                            '<td>'+daName+'</td>'+
                            '<td>'+diForm+'</td>'+
                            '<td>'+diSpecifications+'</td>'+
                            '<td>'+diUnit+'</td>'+
                            '<td>'+diCc+'</td>'+
                            '<td>'+daSupplier+'</td>'+
                            '<td>'+diNewPrice+'</td>'+
                            '<td>'+jiaoyijia+'</td>'+
                            '<td>'+'<input id="caigouliang" name="caigouliang" type="text" value="'+caigouliang+'"><input id="podiId" type="hidden" value="'+v1+'">'+'</td>'+
                            '<td>'+zongjine+'</td>'+
                            '<td>'+dqlName+'</td>'+
                            '<td>'+'<button value="'+ diId+'" onclick="undata(this.value)" data-toggle="modal" data-target="#xiugai">修改供货商</button>'+'</td>'+
                            '<td>'+a+'</td>'+
                            '<td>'+'<a>查看</a>'+'</td>'+
                            '</tr>'
                        $(".a").append($tr);
                    }


            }
        }
    )
}